package org.mili.ticketeer.dto;

public class ContactTicket implements Archivable {

    public static enum Fields implements Field {
        CONTACT,
        TICKET;
    }

    public static enum UniqueFields implements Field {
        CONTACT,
        TICKET;
    }

    public static final String TABLE = "contact_ticket";

    private int contact;
    private int ticket;

    public int getContact() {
        return contact;
    }

    public void setContact(int contact) {
        this.contact = contact;
    }

    public int getTicket() {
        return ticket;
    }

    public void setTicket(int ticket) {
        this.ticket = ticket;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ContactTicket that = (ContactTicket) o;

        if (contact != that.contact) return false;
        if (ticket != that.ticket) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = contact;
        result = 31 * result + ticket;
        return result;
    }

    @Override
    public String toString() {
        return "ContactTicket{" +
                "contact=" + contact +
                ", ticket=" + ticket +
                '}';
    }
}
